/*
 * @Author: xiaosihan
 * @Date: 2025-08-24 10:00:00
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2025-09-26 23:05:40
 */
import Api from './Api';

class DataApi extends Api {
    // 获取Design表数据
    get_design_data(data: any) {
        return this._post("get_design_data", data);
    }

    // 向Design表添加数据
    design_add_data(data: any) {
        return this._post("write_design_add", data);
    }

    // 重新排序Design数据
    design_reorder_data(data: any) {
        return this._post("write_design_reorder", data);
    }

    // 获取OSS文件表数据
    oss_file_get_data(data: any) {
        return this._post("get_oss_file_data", data);
    }

    // 重置OSS文件使用状态为未知
    oss_file_reset_used_status(data: any = {}) {
        return this._post("write_reset_oss_file_status", data);
    }

    // 随机设置Design表数据
    design_random_set_data(data: any = {}) {
        return this._post("write_design_random_set", data);
    }

    // 检查OSS文件URL使用状态
    oss_file_check_usage_status(data: any = {}) {
        return this._post("get_oss_file_usage_status", data);
    }

    // 清空Design表data字段
    design_clear_data(data: any = {}) {
        return this._post("write_design_clear_data", data);
    }

    // 删除Design表全部数据
    design_delete_all_data(data: any = {}) {
        return this._post("del_design_all", data);
    }

    // 重置Design表order字段值
    design_reset_order(data: any = {}) {
        return this._post("reset_design_order", data);
    }

    // 查找匹配数据并更新（每次处理一对数据）
    match_and_update_data(data: any = {}) {
        return this._post("match_and_update_data", data);
    }

    // 更新Design表数据
    design_update_data(data: any) {
        return this._post("update_design_data", data);
    }
}

export default new DataApi();